export default {
  router:{
    middleware:"permission"
  },
  // Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
  ssr: false,//不需要服务器端渲染

  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {//该配置项用于配置应用默认的 meta 标签。
    title: '智信为学',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [   //该配置项用于定义应用的全局（所有页面均需引用的）样式文件、模块或第三方库。
    'element-ui/lib/theme-chalk/index.css'
  ],

  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [  //插件
    '@/plugins/element-ui',
    '@/plugins/vue-mavon-editor'
    // '@/plugins/local-storage'
    
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,//自动导入组件

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [//模块
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
  ],

  // Axios module configuration: https://go.nuxtjs.dev/config-axios
  axios: {
    // baseUrl:"http://localhost:2345/"
    proxy: true,
  },
  proxy: {
    '/classify/': 'http://localhost:2345',
    '/questions/': 'http://localhost:2345',
    // '/msbd/': 'http://localhost:2345',
    '/msbdApi':{
        target: 'http://localhost:2345', // 
        pathRewrite: { '^/msbdApi': '/msbd' }
    }
// }


  },
  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {   //Nuxt.js 允许你在自动生成的 vendor.bundle.js 文件中添加一些模块
             // 以减少应用 bundle 的体积。
    transpile: [/^element-ui/],
  }
}
